package plus.lgx.textsearcher.entity;

import plus.lgx.textsearcher.util.FileUtil;

import java.util.regex.Matcher;

/**
 * Class name: PrintData
 *
 * Create time: 12/21/22 4:12 PM
 *
 * @author lgx
 * @version 1.0
 */
public class PrintData {

    public int fileNumber;
    public int itemNumber;
    public int totalFileNumber;
    public int totalItemNumber;

    public String item;
    public String fileName;
    public String fileSize;
    public String filePath;

    public String searchText;
    public String outputFileName;
    public String outputFilePath;

    public void flushFileHead(FileWrapper wrapper) {
        fileNumber = wrapper.fileNumber;
        totalFileNumber = wrapper.totalFileNumber;
        fileName = wrapper.file.getName();
        filePath = wrapper.file.getAbsolutePath();
        fileSize = FileUtil.toFileLength(wrapper.file.length());
    }

}
